/////////////////////////////////////////////////////////////////////////////
// WMPHotkeys.h : Declaration of the CWMPHotkeys
/////////////////////////////////////////////////////////////////////////////

#ifndef __WMPHOTKEYS_H_
#define __WMPHOTKEYS_H_

#pragma once

#include "resource.h"
#include "wmpplug.h"

// {7DD40B33-B137-4393-9961-471A341AE8FC}
DEFINE_GUID(CLSID_WMPHotkeys, 0x7dd40b33, 0xb137, 0x4393, 0x99, 0x61, 0x47, 0x1a, 0x34, 0x1a, 0xe8, 0xfc);

//globals
extern CComPtr<IWMPCore> g_core;
//keyboard hook
extern HHOOK g_hHook;
//keyboard hook proc
LRESULT CALLBACK keyHookProc(int nCode, WPARAM wParam, LPARAM lParam);

//Keys
#define VK_S 'S'
#define VK_s 's'
#define VK_P 'P'
#define VK_p 'p'
#define VK_N 'N'
#define VK_n 'n'

/////////////////////////////////////////////////////////////////////////////
// CWMPHotkeys
class ATL_NO_VTABLE CWMPHotkeys : 
    public CComObjectRootEx<CComSingleThreadModel>,
    public CComCoClass<CWMPHotkeys, &CLSID_WMPHotkeys>,
    public IWMPPluginUI
{
public:
    CWMPHotkeys();
    ~CWMPHotkeys();

DECLARE_REGISTRY_RESOURCEID(IDR_WMPHOTKEYS)

DECLARE_PROTECT_FINAL_CONSTRUCT()

BEGIN_COM_MAP(CWMPHotkeys)
    COM_INTERFACE_ENTRY(IWMPPluginUI)
END_COM_MAP()

    // CComCoClass methods
    HRESULT FinalConstruct();
    void    FinalRelease();

    // IWMPPluginUI methods
    STDMETHODIMP SetCore(IWMPCore *pCore);
    STDMETHODIMP Create(HWND hwndParent, HWND *phwndWindow) { return E_NOTIMPL; }
    STDMETHODIMP Destroy() { return E_NOTIMPL; }
    STDMETHODIMP TranslateAccelerator(LPMSG lpmsg) { return E_NOTIMPL; }
    STDMETHODIMP DisplayPropertyPage(HWND hwndParent);
    STDMETHODIMP GetProperty(const WCHAR *pwszName, VARIANT *pvarProperty);
    STDMETHODIMP SetProperty(const WCHAR *pwszName, const VARIANT *pvarProperty);

    WCHAR        m_wszPluginText[MAX_PATH];

private:
    void         ReleaseCore();

    CComPtr<IWMPCore>           m_spCore;
};

#endif //__WMPHOTKEYS_H_
